package com.xianniu.ltc.controller;

import com.xianniu.ltc.model.po.report.ReportLeadPO;
import com.xianniu.ltc.model.po.report.StatisticsByDeptPO;
import com.xianniu.ltc.service.ContractService;
import com.xxl.sso.core.entity.ReturnT;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

/**
 * @Author: dingyx
 * @Date: 2022/4/7 2:50 下午
 */
@RestController
@Slf4j
@RequestMapping(value = "/contract")
public class ContractController {
    @Resource
    private ContractService contractService;
    /**
     * 合同统计信息
     * @return
     */
    @PostMapping("/statistics")
    public Map<String, Map<String, TreeMap<String, Map<String, BigDecimal>>>> contractStatistics(){
        return contractService.contractStatistics();
    }

    /**
     * 按照
     * @return
     */
    @PostMapping("/statisticsByDept")
    public Map<String, TreeMap<String, Map<String, BigDecimal>>> statisticsByDept(@RequestBody StatisticsByDeptPO po){
        return contractService. contractStatisticsByDept(po);
    }


}
